#include <utility>
#include <iostream>
#include <string>

using namespace std;

template<typename Fn, typename... Args>
auto FuncWrapper(Fn &&fun, Args &&...args) -> decltype(fun(forward<Args>(args)...)) {
    return fun(forward<Args>(args)...);
}

void f1(int a, double &b) {
    printf("f1\n");
}

char f2(string &&a) {
    printf("f2\n");
}

int main() {
    int a;
    double b;
    string c;
    FuncWrapper(f1, a, b);
    FuncWrapper(f2, move(c));
}